﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Poligono.Web
{
    /// <summary>
    /// 
    /// </summary>
    public class DefaultMessage
    {
        /// <summary>
        /// Default message of Success
        /// </summary>
        public static WebMessage Sucess
        {
            get
            {
                string message = "Operation was successful.";
                MessageType messageType = MessageType.Sucess;
                return GetWebMessage(message, messageType);
            }
        }

        /// <summary>
        /// Default message of Warning
        /// </summary>
        public static WebMessage Warning
        {
            get
            {
                string message = "Operation could not be performed.";
                MessageType messageType = MessageType.Warning;
                return GetWebMessage(message, messageType);
            }
        }

        /// <summary>
        /// Default message of Error
        /// </summary>
        public static WebMessage Error
        {
            get
            {
                string message = string.Empty;
                MessageType messageType = MessageType.Error;
                return GetWebMessage(message, messageType);
            }
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="message"></param>
        /// <param name="messageType"></param>
        /// <returns></returns>
        private static WebMessage GetWebMessage(string message, MessageType messageType)
        {
            WebMessage webMessage = new WebMessage(message, messageType);
            return webMessage;
        }
    }
}